﻿<%@ Page Language="C#" AutoEventWireup="true" Theme="Default" CodeBehind="YueDuTZKJDJ.aspx.cs" Inherits="Web.Pages.YongShui._13.LAIHANGL.YuDuTZKJDJ" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="../../../../JS/layui/css/layui.css" rel="stylesheet" />
    <script src="../../../../JS/layui/layui.js"></script>
    <script src="../../../JS/jquery.js" type="text/javascript"></script>
    <script src="../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <script>
        layui.use(['form', 'jquery'], function () {
            var form = layui.form()
            , layer = layui.layer
            , $ = layui.jquery;

            /*initial load start*/
            var date = new Date();
            var year = date.getFullYear();
            var month = date.getMonth() + 1;
            var day = date.getDate();
            var rqstr = year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day);

            /*initial load end*/

            /*event*/
            window.OpenCuoWuXX = function (yonghuh) {
                var parms = "?yonghuh=" + yonghuh;
                var url = "";
                var width = "900px";
                var height = "550px";
                url = "/Pages/YongShui/13.LaihanGL/YUEDUTZDJ.aspx";
                url = url + parms;
                //openCenter1(url, width, height);
                layer.open({
                    type: 2,
                    title: "",
                    shadeClose: false,
                    shade: 0.8,
                    area: [width, height],
                    content: url,
                    end: function () {
                        location = 'YueDuTZKJDJ.aspx';
                    }
                   
                });
            }

            /*event end*/
        });

        //function Reload2() {
        //    alert();
        //    location = 'YueDuTZKJDJ.aspx';
        //}

    </script>
<%--    <script type="text/javascript">
        function OpenCuoWuXX(yonghuh) {
            var parms = "?yonghuh=" + yonghuh;
            var url = "";

            var width = "900px";
            var height = "620px";
            url = "/Pages/YongShui/13.LaihanGL/YUEDUTZDJ.aspx";
            url = url + parms;
            openCenter1(url, width, height);

        }

        function openCenter1(openUrl, iWidth, iHeight) {
            var iTop = (window.screen.availHeight - 45 - iHeight) / 2; //获得窗口的垂直位置;
            var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; //获得窗口的水平位置;
            var sResult = window.showModalDialog(openUrl, window, "dialogHeight=" + iHeight + ";dialogwidth=" + iWidth + ";dialogLeft=" + iLeft + ";dialogTop=" + iTop + ";scroll=yes;");

        }

   </script>--%>
    <script type="text/javascript">
        var model;
        function Check(q) {
            YongHuHList.Set("yonghuh", $(q).val());
            model = q;
            PostBack.PerformCallback("yonghuh");

        }
        function aa(dom) {
            $(dom).next("input[type='hidden']").val();
        }
        function PostBack_Call(rs) {
            var arrs = rs.split('|');
            var key = arrs[0];
            var code = arrs[1];
            var msg = arrs[2];
            if (code < 0) {
                alert(msg);
            }
            else {
                alert(msg);
                $(model).attr("disabled", "disabled");
            }
        }
       
        function OnInit(s, e) {
            AdjustSize();
        }
        function OnEndCallback(s, e) {
            AdjustSize();
        }

        function AdjustSize() {
            var height = Math.max(0, document.documentElement.clientHeight -80);
            ASPxGridViewList.SetHeight(height);
        }

       
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel runat="server" ID="updatePanel1">
            <ContentTemplate>
                <div>
                    <div class="tabletitle1" align="center">
                        超计划用户信息
                    </div>
                    <table style="width:100%">
                        <tr>
                            <td align="right" style="width:40px">
                                站点：
                            </td>
                            <td>
                                 <dx:ASPxComboBox ID="DrpSite" OnSelectedIndexChanged="DrpSite_SelectedIndexChanged" AutoPostBack="true" runat="server" ValueType="System.String">
                                     <ClientSideEvents SelectedIndexChanged="function(s,e){LoadPanel.Show();}" />
                                 </dx:ASPxComboBox>
                    
                            </td>
                            <td style="margin-right:60px;">
                                <span runat="server" id="TotalSpan"></span>
                            </td>
                            </td><td align="right">
                                 <dx:ASPxButton ID="BtnReturn" ClientInstanceName="BtnReturn" runat="server"  Text="返回">
                                        <ClientSideEvents Click="function(s,e){ location='LAIHANDJGL.html';}" />
                                    </dx:ASPxButton> 
                            </td> 
                        </tr>
                       </table>
                   <dx:ASPxHiddenField ID="YongHuHList" ClientInstanceName="YongHuHList" runat="server"></dx:ASPxHiddenField>
                    <dx:ASPxCallback ID="PostBack"  ClientInstanceName="PostBack" ClientSideEvents-CallbackComplete="function(s,e){PostBack_Call(e.result);}" OnCallback="PostBack_Callback" runat="server"></dx:ASPxCallback>
                    <div>
                        <dx:ASPxGridView ID="ASPxGridViewList"    ClientInstanceName="ASPxGridViewList" runat="server" AutoGenerateColumns="False" KeyFieldName="S_YONGHUH" Width="100%" Theme="Aqua1">
                            <Columns>
                               
                                <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="30%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="50%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="JIAJIAYSL" Caption="加价量" Width="8%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn  Caption="操作" Width="12%" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
                                    <DataItemTemplate>
                                        <%#GetCaoZuo(Eval("S_YONGHUH").ToString(),Eval("QR").ToString(),Eval("YUEDU").ToString()) %>
                                    </DataItemTemplate>
                                </dx:GridViewDataTextColumn>
                               
                            </Columns>
                            <SettingsPager  Mode="ShowAllRecords"></SettingsPager>
                             <ClientSideEvents Init="OnInit" EndCallback="OnEndCallback"/>
                            <Settings  VerticalScrollableHeight="350" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />

                        </dx:ASPxGridView>
                    </div>
                </div>
                 <dx:ASPxLoadingPanel ID="LoadPanel" Theme="Metropolis" ClientInstanceName="LoadPanel" runat="server" Modal="True" Text="正在查询..."></dx:ASPxLoadingPanel>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>

